#Make module to search for Kopete library
#
# If it's found it sets KOPETE_FOUND to TRUE
# and following variables are set:
#    KOPETE_INCLUDE_DIRS
#    KOPETE_LIBRARIES



FIND_PATH(KOPETE_INCLUDE_DIR kopeteaccount.h
/usr/include/kopete
/usr/include/
/usr/local/include
/usr/local/include/kopete
)

SET(KOPETE_NAMES ${KOPETE_NAMES} kopete)
FIND_LIBRARY(KOPETE_LIBRARY
  NAMES ${KOPETE_NAMES}
  PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
)

IF (KOPETE_INCLUDE_DIR AND KOPETE_LIBRARY)
   SET(KOPETE_FOUND "YES")
ELSE (KOPETE_LIBRARY AND KOPETE_INCLUDE_DIR)
  SET(KOPETE_FOUND "NO")
ENDIF (KOPETE_INCLUDE_DIR AND KOPETE_LIBRARY)


IF (KOPETE_FOUND)
   IF (NOT KOPETE_FIND_QUIETLY)
      MESSAGE(STATUS "Found KOPETE: ${KOPETE_LIBRARY}")
   ENDIF (NOT KOPETE_FIND_QUIETLY)
ELSE (KOPETE_FOUND)
      MESSAGE(FATAL_ERROR "Could not find kopete")
ENDIF (KOPETE_FOUND)

SET (KOPETE_LIBRARIES ${KOPETE_LIBRARY})
SET (KOPETE_INCLUDE_DIRS ${KOPETE_INCLUDE_DIR})

MARK_AS_ADVANCED(
    KOPETE_LIBRARIES
    KOPETE_INCLUDE_DIRS
)
